# Author:Mingshi

stu_成绩 =[97,95,93,95,92,96,92,95,100]

# 3.2 pop() 删除 pop（）不填内容 对应记忆==>append()删除末位
# 目标： 使用pop()删除 成绩为95 的所有值
# for i in stu_成绩:
#     if i == 95:
#         print(stu_成绩.index(i))

# 本质： list 本身有index & value
pop_index_list = []
for index,value in enumerate(stu_成绩):
    #print(index,value)
    if value == 95:
        #stu_成绩.pop(index)
        stu_成绩[index] += 1
        #print(index,value)
print(stu_成绩)

# 1. copy()很重要
# 思考，赋值是真正的复制么？ 赋值(=) <=> copy? 不等价
stu_id_matedata = stu_id
print("stu_id:",stu_id,'\n','stu_id_matedata:',stu_id_matedata)

# 实验 1 赋值
# stu_id.pop(1)
# print("stu_id:",stu_id,'\n','stu_id_matedata:',stu_id_matedata)

# 实验2 copy()
# stu_id_matedata = stu_id.copy()
# stu_id.pop(1)
# print("stu_id:",stu_id,'\n','stu_id_matedata:',stu_id_matedata)

# 实验3 切片实现复制
stu_id_matedata = stu_id[:]
stu_id.pop(1)
print("stu_id:",stu_id,'\n','stu_id_matedata:',stu_id_matedata)